<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title></title>
</head>
<body>
<form action="http://localhost:8080/android2/login" method="post">
<input type="radio" name="an[0]" value="1"/>1
<input type="radio" name="an[0]" value="2"/>2
<input type="radio" name="an[0]" value="3"/>3
<input type="radio" name="an[1]" value="1"/>1
<input type="radio" name="an[1]" value="2"/>2
<input type="radio" name="an[1]" value="3"/>3
<input type="submit" value="submit"/>

</form>
<button onclick="run();">点击</button>
<button onclick="run2();">点击2</button>
<script src="axios.min.js"></script>
<script src="jquery-1.12.4.min.js"></script>
<script>
  
  function run () {
    axios.defaults.baseURL = 'http://localhost:8080/android2';
    axios.defaults.headers.post['Content-Type'] = 'application/x-www-form-urlencoded';
    axios.post('/login',"firstName=Fred&lastName=Flintstone")
  .then(function (response) {
    console.log(response);
  })
  .catch(function (error) {
    console.log(error);
  });
   
  }
  function run2 () {
    $.post('http://localhost:8080/android2/login',{
        firstName: 'Fred',        // 参数 firstName
        lastName: 'Flintstone'    // 参数 lastName
      }).then(function (data) {
      console.log(data)
    })
  }
</script>
</body>
</html>